home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / Tool Chest / Interfaces / UniversalInterfaces 1.0 / CIncludes / TSMTE.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-18  |  5.5 KB  |  192 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        TSMTE.h
  3.  
  4.     Copyright:    © 1984-1993 by Apple Computer, Inc., all rights reserved.
  5.  
  6.     WARNING
  7.     This file was auto generated by the interfacer tool. Modifications
  8.     must be made to the master file.
  9.  
  10. */
  11.  
  12.  
  13. /*
  14.     File:        TSMTE.h
  15.  
  16.     Contains:    Definitions for TSMTE
  17.  
  18.     Written by:    Kida Yasuo, Hara Keisuke
  19.  
  20.     Copyright:    ©1991-1993 Apple Technology, Inc.
  21.                 All rights reserved.
  22.  
  23.     Change History (most recent first):
  24.  
  25.          <8>      94.1.7    Kda        Modified for the Interfacer tool.  Sync with TSMTE tech note.
  26.          <7>      92.9.4    Kda        Moved gestaltTSMTEVersion and kTSMTEDialog from the private
  27.                                     header.  Updated the version from 0.1 to 1.0.
  28.          <6>     92.7.31    Kda        Moved gestaltTSMTEAttr from TSMTEPriv.h
  29.          <5>     92.7.31    Kda        Modified TSMTERec and added a preUpdateProc.
  30.          <4>     92.7.16    Kda        
  31.          <3>     92.7.16    Kda        Added kTSMTEInterfaceType for interface type used in
  32.                                     NewTSMDocument.
  33.          <2>      92.6.5    Kda        Removed the signature field from TSMTERec.
  34.          <1>      92.6.5    Kda        first checked in
  35.  
  36. */
  37.  
  38. #ifndef __TSMTE__
  39. #define __TSMTE__
  40.  
  41. #ifndef __TEXTEDIT__
  42. #include <TextEdit.h>
  43. /*    #include <Quickdraw.h>                                        */
  44. /*        #include <Types.h>                                        */
  45. /*            #include <ConditionalMacros.h>                        */
  46. /*            #include <MixedMode.h>                                */
  47. /*                #include <Traps.h>                                */
  48. /*        #include <QuickdrawText.h>                                */
  49. /*            #include <IntlResources.h>                            */
  50. #endif
  51.  
  52. #ifndef __DIALOGS__
  53. #include <Dialogs.h>
  54. /*    #include <Windows.h>                                        */
  55. /*        #include <Events.h>                                        */
  56. /*            #include <OSUtils.h>                                */
  57. /*        #include <Controls.h>                                    */
  58. /*            #include <Menus.h>                                    */
  59. #endif
  60.  
  61. #ifndef __TEXTSERVICES__
  62. #include <TextServices.h>
  63. /*    #include <AppleEvents.h>                                    */
  64. /*        #include <Memory.h>                                        */
  65. /*        #include <EPPC.h>                                        */
  66. /*            #include <PPCToolBox.h>                                */
  67. /*                #include <AppleTalk.h>                            */
  68. /*            #include <Processes.h>                                */
  69. /*                #include <Files.h>                                */
  70. /*                    #include <SegLoad.h>                        */
  71. /*        #include <Notification.h>                                */
  72. /*    #include <Errors.h>                                            */
  73. /*    #include <Components.h>                                        */
  74. #endif
  75.  
  76. enum  {
  77.     kTSMTESignature                = 'tmTE',
  78.     kTSMTEInterfaceType            = kTSMTESignature,
  79.     kTSMTEDialog                = 'tmDI'
  80. };
  81.  
  82.  
  83. // Gestalt
  84.  
  85. enum  {
  86.     gestaltTSMTEAttr            = kTSMTESignature,
  87.     gestaltTSMTEPresent            = 0,
  88.     gestaltTSMTE                = gestaltTSMTEPresent,
  89.     gestaltTSMTEVersion            = 'tmTV',
  90.     gestaltTSMTE1                = 0x100
  91. };
  92.  
  93.  
  94. // update flag for TSMTERec
  95.  
  96. enum  {
  97.     kTSMTEAutoScroll            = 1
  98. };
  99.  
  100.  
  101. // callback procedure definitions
  102.  
  103. typedef pascal void (*TSMTEPreUpdateProcPtr)(TEHandle textH, long refCon);
  104.  
  105. enum {
  106.     uppTSMTEPreUpdateProcInfo = kPascalStackBased
  107.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(TEHandle)))
  108.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
  109. };
  110.  
  111. #if USESROUTINEDESCRIPTORS
  112. typedef UniversalProcPtr TSMTEPreUpdateUPP;
  113.  
  114. #define CallTSMTEPreUpdateProc(userRoutine, textH, refCon)        \
  115.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppTSMTEPreUpdateProcInfo, (textH), (refCon))
  116. #define NewTSMTEPreUpdateProc(userRoutine)        \
  117.         (TSMTEPreUpdateUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppTSMTEPreUpdateProcInfo, GetCurrentISA())
  118. #else
  119. typedef TSMTEPreUpdateProcPtr TSMTEPreUpdateUPP;
  120.  
  121. #define CallTSMTEPreUpdateProc(userRoutine, textH, refCon)        \
  122.         (*(userRoutine))((textH), (refCon))
  123. #define NewTSMTEPreUpdateProc(userRoutine)        \
  124.         (TSMTEPreUpdateUPP)(userRoutine)
  125. #endif
  126.  
  127. typedef pascal void (*TSMTEPostUpdateProcPtr)(TEHandle textH, long fixLen, long inputAreaStart, long inputAreaEnd, long pinStart, long pinEnd, long refCon);
  128.  
  129. enum {
  130.     uppTSMTEPostUpdateProcInfo = kPascalStackBased
  131.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(TEHandle)))
  132.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
  133.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long)))
  134.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(long)))
  135.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(long)))
  136.          | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(long)))
  137.          | STACK_ROUTINE_PARAMETER(7, SIZE_CODE(sizeof(long)))
  138. };
  139.  
  140. #if USESROUTINEDESCRIPTORS
  141. typedef UniversalProcPtr TSMTEPostUpdateUPP;
  142.  
  143. #define CallTSMTEPostUpdateProc(userRoutine, textH, fixLen, inputAreaStart, inputAreaEnd, pinStart, pinEnd, refCon)        \
  144.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppTSMTEPostUpdateProcInfo, (textH), (fixLen), (inputAreaStart), (inputAreaEnd), (pinStart), (pinEnd), (refCon))
  145. #define NewTSMTEPostUpdateProc(userRoutine)        \
  146.         (TSMTEPostUpdateUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppTSMTEPostUpdateProcInfo, GetCurrentISA())
  147. #else
  148. typedef TSMTEPostUpdateProcPtr TSMTEPostUpdateUPP;
  149.  
  150. #define CallTSMTEPostUpdateProc(userRoutine, textH, fixLen, inputAreaStart, inputAreaEnd, pinStart, pinEnd, refCon)        \
  151.         (*(userRoutine))((textH), (fixLen), (inputAreaStart), (inputAreaEnd), (pinStart), (pinEnd), (refCon))
  152. #define NewTSMTEPostUpdateProc(userRoutine)        \
  153.         (TSMTEPostUpdateUPP)(userRoutine)
  154. #endif
  155.  
  156.  
  157. // data types
  158.  
  159. #if defined(powerc) || defined (__powerc)
  160. #pragma options align=mac68k
  161. #endif
  162. struct TSMTERec {
  163.     TEHandle                    textH;
  164.     TSMTEPreUpdateUPP            preUpdateProc;
  165.     TSMTEPostUpdateUPP            postUpdateProc;
  166.     long                        updateFlag;
  167.     long                        refCon;
  168. };
  169. #if defined(powerc) || defined(__powerc)
  170. #pragma options align=reset
  171. #endif
  172.  
  173. typedef struct TSMTERec TSMTERec, *TSMTERecPtr, **TSMTERecHandle;
  174.  
  175. #if defined(powerc) || defined (__powerc)
  176. #pragma options align=mac68k
  177. #endif
  178. struct TSMDialogRecord {
  179.     DialogRecord                fDialog;
  180.     TSMDocumentID                fDocID;
  181.     TSMTERecHandle                fTSMTERecH;
  182.     long                        fTSMTERsvd[3];                    // reserved
  183. };
  184. #if defined(powerc) || defined(__powerc)
  185. #pragma options align=reset
  186. #endif
  187.  
  188. typedef struct TSMDialogRecord TSMDialogRecord, *TSMDialogPeek;
  189.  
  190. #endif
  191.  
  192.